
#ifndef PLAYER_H
#define PLAYER_H

#include "ImageManager.h"
#include "InputState.h"

using namespace ETM::Resources;

namespace ETM
{
	class Level;

	class Player
	{
	private:
		Level* currentLevel;
		sf::Sprite sprite;

		sf::Vector2f velocity;
		float movement;
		float previousBottom;
		float jumpTime;
		bool isOnGround;
		bool wasJumping;
		bool isJumping;

	public:
		Player();
		void Load();
		void Update(sf::View& view, float delta);
		void Render(sf::RenderWindow& window);
		void HandleInput();
		void HandlePhysics(float delta);
		void HandleCollision();
		float Jump(float velocityY, float delta);
		sf::FloatRect GetBounds();
		sf::Sprite& GetSprite();
		void SetLevel(Level* level);
		void SetPosition(float x, float y);
	};
}

#endif